<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.18"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>HElib: helib::PubKey Class Reference</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
		<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100;1,700&family=Merriweather&family=Merriweather+Sans&family=Open+Sans&family=Poppins:ital@1&family=Roboto:ital,wght@0,400;1,300;1,900&display=swap" rel="stylesheet"> 
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body style="font-family: 'Merriweather', serif;">
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand">HElib Implementing Homomorphic Encryption</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacehelib.html">helib</a></li><li class="navelem"><a class="el" href="classhelib_1_1_pub_key.html">PubKey</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classhelib_1_1_pub_key-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">helib::PubKey Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>The public key.  
 <a href="classhelib_1_1_pub_key.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="keys_8h_source.html">keys.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for helib::PubKey:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classhelib_1_1_pub_key.png" usemap="#helib::PubKey_map" alt=""/>
  <map id="helib::PubKey_map" name="helib::PubKey_map">
<area href="classhelib_1_1_sec_key.html" title="The secret key." alt="helib::SecKey" shape="rect" coords="0,56,89,80"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aafaeff3bae5bac16d5a4bf127e2f6f2d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#aafaeff3bae5bac16d5a4bf127e2f6f2d">PubKey</a> ()</td></tr>
<tr class="memdesc:aafaeff3bae5bac16d5a4bf127e2f6f2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">This constructor thorws run-time error if activeContext=nullptr.  <a href="classhelib_1_1_pub_key.html#aafaeff3bae5bac16d5a4bf127e2f6f2d">More...</a><br /></td></tr>
<tr class="separator:aafaeff3bae5bac16d5a4bf127e2f6f2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a825712e884ac70538420e3cd3d553e22"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a825712e884ac70538420e3cd3d553e22">PubKey</a> (const <a class="el" href="classhelib_1_1_context.html">Context</a> &amp;_context)</td></tr>
<tr class="separator:a825712e884ac70538420e3cd3d553e22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa923dff5492cd91bbf8d24ab9258ce1a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#aa923dff5492cd91bbf8d24ab9258ce1a">PubKey</a> (const <a class="el" href="classhelib_1_1_pub_key.html">PubKey</a> &amp;other)</td></tr>
<tr class="memdesc:aa923dff5492cd91bbf8d24ab9258ce1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor.  <a href="classhelib_1_1_pub_key.html#aa923dff5492cd91bbf8d24ab9258ce1a">More...</a><br /></td></tr>
<tr class="separator:aa923dff5492cd91bbf8d24ab9258ce1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aabd77762ff776bfbf3ae389b49fa7ac9"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#aabd77762ff776bfbf3ae389b49fa7ac9">~PubKey</a> ()=default</td></tr>
<tr class="memdesc:aabd77762ff776bfbf3ae389b49fa7ac9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default destructor.  <a href="classhelib_1_1_pub_key.html#aabd77762ff776bfbf3ae389b49fa7ac9">More...</a><br /></td></tr>
<tr class="separator:aabd77762ff776bfbf3ae389b49fa7ac9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa13affb78adf902978fad938c8f56eae"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#aa13affb78adf902978fad938c8f56eae">clear</a> ()</td></tr>
<tr class="memdesc:aa13affb78adf902978fad938c8f56eae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear all public-key data.  <a href="classhelib_1_1_pub_key.html#aa13affb78adf902978fad938c8f56eae">More...</a><br /></td></tr>
<tr class="separator:aa13affb78adf902978fad938c8f56eae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7a054c57be24207281e69608bed29b2"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#ae7a054c57be24207281e69608bed29b2">operator==</a> (const <a class="el" href="classhelib_1_1_pub_key.html">PubKey</a> &amp;other) const</td></tr>
<tr class="separator:ae7a054c57be24207281e69608bed29b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a014ede31ce4b686ddf491d30cd7a581a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a014ede31ce4b686ddf491d30cd7a581a">operator!=</a> (const <a class="el" href="classhelib_1_1_pub_key.html">PubKey</a> &amp;other) const</td></tr>
<tr class="separator:a014ede31ce4b686ddf491d30cd7a581a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa58d563a7ee4e27f2c46f97a3f5997dc"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classhelib_1_1_context.html">Context</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#aa58d563a7ee4e27f2c46f97a3f5997dc">getContext</a> () const</td></tr>
<tr class="separator:aa58d563a7ee4e27f2c46f97a3f5997dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa470fb7bc65e658efd02858188078384"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#aa470fb7bc65e658efd02858188078384">getPtxtSpace</a> () const</td></tr>
<tr class="separator:aa470fb7bc65e658efd02858188078384"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa19bebb6be7b4cedb58a1a045df68b3a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#aa19bebb6be7b4cedb58a1a045df68b3a">keyExists</a> (long keyID) const</td></tr>
<tr class="separator:aa19bebb6be7b4cedb58a1a045df68b3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af00d3629c7dc16946cc48942edf797fb"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#af00d3629c7dc16946cc48942edf797fb">getSKeyBound</a> (long keyID=0) const</td></tr>
<tr class="memdesc:af00d3629c7dc16946cc48942edf797fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">The size of the secret key.  <a href="classhelib_1_1_pub_key.html#af00d3629c7dc16946cc48942edf797fb">More...</a><br /></td></tr>
<tr class="separator:af00d3629c7dc16946cc48942edf797fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67598f5056cba7b1b94fcdd8482a947c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a67598f5056cba7b1b94fcdd8482a947c">isReachable</a> (long k, long keyID=0) const</td></tr>
<tr class="memdesc:a67598f5056cba7b1b94fcdd8482a947c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is it possible to re-linearize the automorphism X -&gt; X^k See Section 3.2.2 in the design document (KeySwitchMap)  <a href="classhelib_1_1_pub_key.html#a67598f5056cba7b1b94fcdd8482a947c">More...</a><br /></td></tr>
<tr class="separator:a67598f5056cba7b1b94fcdd8482a947c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8abfcc223328521acf1976e5dd33ba53"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a8abfcc223328521acf1976e5dd33ba53">setKeySwitchMap</a> (long keyId=0)</td></tr>
<tr class="memdesc:a8abfcc223328521acf1976e5dd33ba53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the reachability graph of key-switching matrices See Section 3.2.2 in the design document (KeySwitchMap)  <a href="classhelib_1_1_pub_key.html#a8abfcc223328521acf1976e5dd33ba53">More...</a><br /></td></tr>
<tr class="separator:a8abfcc223328521acf1976e5dd33ba53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b98b32c0ec476420d0d6f817cccd82c"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a5b98b32c0ec476420d0d6f817cccd82c">getKSStrategy</a> (long dim) const</td></tr>
<tr class="memdesc:a5b98b32c0ec476420d0d6f817cccd82c"><td class="mdescLeft">&#160;</td><td class="mdescRight">get KS strategy for dimension dim dim == -1 is Frobenius  <a href="classhelib_1_1_pub_key.html#a5b98b32c0ec476420d0d6f817cccd82c">More...</a><br /></td></tr>
<tr class="separator:a5b98b32c0ec476420d0d6f817cccd82c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a448fbc74eecbdb3b369dcea9c5d85ce2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a448fbc74eecbdb3b369dcea9c5d85ce2">setKSStrategy</a> (long dim, int val)</td></tr>
<tr class="memdesc:a448fbc74eecbdb3b369dcea9c5d85ce2"><td class="mdescLeft">&#160;</td><td class="mdescRight">set KS strategy for dimension dim dim == -1 is Frobenius  <a href="classhelib_1_1_pub_key.html#a448fbc74eecbdb3b369dcea9c5d85ce2">More...</a><br /></td></tr>
<tr class="separator:a448fbc74eecbdb3b369dcea9c5d85ce2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0346c2c214b648809f6b754de9e5d431"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a0346c2c214b648809f6b754de9e5d431">Encrypt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ciphertxt, const NTL::ZZX &amp;plaintxt, long ptxtSpace, bool highNoise) const</td></tr>
<tr class="separator:a0346c2c214b648809f6b754de9e5d431"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4daedf40ea1c65e1004289a6033d59b0"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a4daedf40ea1c65e1004289a6033d59b0">Encrypt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ciphertxt, const <a class="el" href="namespacehelib.html#a4d6002f36f1a61982fded09adf1331ca">zzX</a> &amp;plaintxt, long ptxtSpace, bool highNoise) const</td></tr>
<tr class="separator:a4daedf40ea1c65e1004289a6033d59b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aafbfc62d5d78c39aa7929d552b31ff03"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#aafbfc62d5d78c39aa7929d552b31ff03">CKKSencrypt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ciphertxt, const NTL::ZZX &amp;plaintxt, double ptxtSize=1.0, double scaling=0.0) const</td></tr>
<tr class="separator:aafbfc62d5d78c39aa7929d552b31ff03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13f6dfdd7645c35558ef906e8e1cfd69"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a13f6dfdd7645c35558ef906e8e1cfd69">CKKSencrypt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ciphertxt, const <a class="el" href="namespacehelib.html#a4d6002f36f1a61982fded09adf1331ca">zzX</a> &amp;plaintxt, double ptxtSize=1.0, double scaling=0.0) const</td></tr>
<tr class="separator:a13f6dfdd7645c35558ef906e8e1cfd69"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a784412272e2ac12de357319b60c35f36"><td class="memItemLeft" align="right" valign="top">virtual long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a784412272e2ac12de357319b60c35f36">Encrypt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ciphertxt, const NTL::ZZX &amp;plaintxt, long ptxtSpace=0) const</td></tr>
<tr class="separator:a784412272e2ac12de357319b60c35f36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7fec47c6a84534ed1b359e3a64f54a83"><td class="memItemLeft" align="right" valign="top">virtual long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a7fec47c6a84534ed1b359e3a64f54a83">Encrypt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ciphertxt, const <a class="el" href="namespacehelib.html#a4d6002f36f1a61982fded09adf1331ca">zzX</a> &amp;plaintxt, long ptxtSpace=0) const</td></tr>
<tr class="separator:a7fec47c6a84534ed1b359e3a64f54a83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab26be749db4dd2b5d102a77bf70f4de3"><td class="memTemplParams" colspan="2">template&lt;typename Scheme &gt; </td></tr>
<tr class="memitem:ab26be749db4dd2b5d102a77bf70f4de3"><td class="memTemplItemLeft" align="right" valign="top">long&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#ab26be749db4dd2b5d102a77bf70f4de3">Encrypt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ciphertxt, const <a class="el" href="classhelib_1_1_ptxt.html">Ptxt</a>&lt; Scheme &gt; &amp;plaintxt, long ptxtSpace=0) const</td></tr>
<tr class="memdesc:ab26be749db4dd2b5d102a77bf70f4de3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encrypts a plaintext into a ciphertext.  <a href="classhelib_1_1_pub_key.html#ab26be749db4dd2b5d102a77bf70f4de3">More...</a><br /></td></tr>
<tr class="separator:ab26be749db4dd2b5d102a77bf70f4de3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab8aed3e83355c67529fa2f53b2fb1ba5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#ab8aed3e83355c67529fa2f53b2fb1ba5">isCKKS</a> () const</td></tr>
<tr class="separator:ab8aed3e83355c67529fa2f53b2fb1ba5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0ad65deb509b0e020dd603a4857492a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#ad0ad65deb509b0e020dd603a4857492a">isBootstrappable</a> () const</td></tr>
<tr class="separator:ad0ad65deb509b0e020dd603a4857492a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65479b612f5d28386fb1205858416957"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a65479b612f5d28386fb1205858416957">reCrypt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ctxt) const</td></tr>
<tr class="separator:a65479b612f5d28386fb1205858416957"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac442b7e06a49fde0d0cd067f00c259e8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#ac442b7e06a49fde0d0cd067f00c259e8">thinReCrypt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ctxt) const</td></tr>
<tr class="separator:ac442b7e06a49fde0d0cd067f00c259e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45c4f7b5816402ddaf16c7df1b60b9c6"><td class="memItemLeft" align="right" valign="top">friend&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a45c4f7b5816402ddaf16c7df1b60b9c6">void ::helib::writePubKeyBinary</a> (std::ostream &amp;str, const <a class="el" href="classhelib_1_1_pub_key.html">PubKey</a> &amp;pk)</td></tr>
<tr class="separator:a45c4f7b5816402ddaf16c7df1b60b9c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97b95f757398bed078ac7e01efd96ec3"><td class="memItemLeft" align="right" valign="top">friend&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a97b95f757398bed078ac7e01efd96ec3">void ::helib::readPubKeyBinary</a> (std::istream &amp;str, <a class="el" href="classhelib_1_1_pub_key.html">PubKey</a> &amp;pk)</td></tr>
<tr class="separator:a97b95f757398bed078ac7e01efd96ec3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad607fc183a04a38ea758df7094957410"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#ad607fc183a04a38ea758df7094957410">hackPtxtSpace</a> (long p2r)</td></tr>
<tr class="separator:ad607fc183a04a38ea758df7094957410"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5744e83be6175512dc561ad9276157da"><td class="memItemLeft" align="right" valign="top">template&lt;&gt; </td></tr>
<tr class="memitem:a5744e83be6175512dc561ad9276157da"><td class="memTemplItemLeft" align="right" valign="top">long&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a5744e83be6175512dc561ad9276157da">Encrypt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ciphertxt, const <a class="el" href="classhelib_1_1_ptxt.html">Ptxt</a>&lt; <a class="el" href="structhelib_1_1_b_g_v.html">BGV</a> &gt; &amp;plaintxt, long ptxtSpace) const</td></tr>
<tr class="separator:a5744e83be6175512dc561ad9276157da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb5c65279c92fdecf07c34116a6854fd"><td class="memItemLeft" align="right" valign="top">template&lt;&gt; </td></tr>
<tr class="memitem:afb5c65279c92fdecf07c34116a6854fd"><td class="memTemplItemLeft" align="right" valign="top">long&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#afb5c65279c92fdecf07c34116a6854fd">Encrypt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ciphertxt, const <a class="el" href="classhelib_1_1_ptxt.html">Ptxt</a>&lt; <a class="el" href="structhelib_1_1_c_k_k_s.html">CKKS</a> &gt; &amp;plaintxt, <a class="el" href="api_attributes_8h.html#addf5ec070e9499d36b7f2009ce736076">UNUSED</a> long ptxtSpace) const</td></tr>
<tr class="separator:afb5c65279c92fdecf07c34116a6854fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Find key-switching matrices</div></td></tr>
<tr class="memitem:adf27c278c7ae39ad8f7550774693fe2d"><td class="memItemLeft" align="right" valign="top">const std::vector&lt; <a class="el" href="classhelib_1_1_key_switch.html">KeySwitch</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#adf27c278c7ae39ad8f7550774693fe2d">keySWlist</a> () const</td></tr>
<tr class="separator:adf27c278c7ae39ad8f7550774693fe2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a36e271b46f74eb1f10deeb15f38ef612"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classhelib_1_1_key_switch.html">KeySwitch</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a36e271b46f74eb1f10deeb15f38ef612">getKeySWmatrix</a> (const <a class="el" href="classhelib_1_1_s_k_handle.html">SKHandle</a> &amp;from, long toID=0) const</td></tr>
<tr class="memdesc:a36e271b46f74eb1f10deeb15f38ef612"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find a key-switching matrix by its indexes. If no such matrix exists it returns a dummy matrix with toKeyID==-1.  <a href="classhelib_1_1_pub_key.html#a36e271b46f74eb1f10deeb15f38ef612">More...</a><br /></td></tr>
<tr class="separator:a36e271b46f74eb1f10deeb15f38ef612"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1699dcc28066d1628d4924b00c03ff7f"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classhelib_1_1_key_switch.html">KeySwitch</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a1699dcc28066d1628d4924b00c03ff7f">getKeySWmatrix</a> (long fromSPower, long fromXPower, long fromID=0, long toID=0) const</td></tr>
<tr class="separator:a1699dcc28066d1628d4924b00c03ff7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aabf2e70d488f0e10604861d9d1d1b586"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#aabf2e70d488f0e10604861d9d1d1b586">haveKeySWmatrix</a> (const <a class="el" href="classhelib_1_1_s_k_handle.html">SKHandle</a> &amp;from, long toID=0) const</td></tr>
<tr class="separator:aabf2e70d488f0e10604861d9d1d1b586"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a802336b0a511ddfe07495d6386061041"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a802336b0a511ddfe07495d6386061041">haveKeySWmatrix</a> (long fromSPower, long fromXPower, long fromID=0, long toID=0) const</td></tr>
<tr class="separator:a802336b0a511ddfe07495d6386061041"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78cf90689deb41b4dcd2346722e22d9d"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classhelib_1_1_key_switch.html">KeySwitch</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a78cf90689deb41b4dcd2346722e22d9d">getAnyKeySWmatrix</a> (const <a class="el" href="classhelib_1_1_s_k_handle.html">SKHandle</a> &amp;from) const</td></tr>
<tr class="memdesc:a78cf90689deb41b4dcd2346722e22d9d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is there a matrix from this key to <em>any</em> base key?  <a href="classhelib_1_1_pub_key.html#a78cf90689deb41b4dcd2346722e22d9d">More...</a><br /></td></tr>
<tr class="separator:a78cf90689deb41b4dcd2346722e22d9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85d422013d6854bd95947a75da4ccf63"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a85d422013d6854bd95947a75da4ccf63">haveAnyKeySWmatrix</a> (const <a class="el" href="classhelib_1_1_s_k_handle.html">SKHandle</a> &amp;from) const</td></tr>
<tr class="separator:a85d422013d6854bd95947a75da4ccf63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a9ef8dbc3d89b669b8b375352a64e0c"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classhelib_1_1_key_switch.html">KeySwitch</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a0a9ef8dbc3d89b669b8b375352a64e0c">getNextKSWmatrix</a> (long fromXPower, long fromID=0) const</td></tr>
<tr class="memdesc:a0a9ef8dbc3d89b669b8b375352a64e0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the next matrix to use for multi-hop automorphism See Section 3.2.2 in the design document.  <a href="classhelib_1_1_pub_key.html#a0a9ef8dbc3d89b669b8b375352a64e0c">More...</a><br /></td></tr>
<tr class="separator:a0a9ef8dbc3d89b669b8b375352a64e0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ac16ee4cbf52d86accf5f7e82a83f3991"><td class="memItemLeft" align="right" valign="top">static long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#ac16ee4cbf52d86accf5f7e82a83f3991">ePlusR</a> (long p)</td></tr>
<tr class="separator:ac16ee4cbf52d86accf5f7e82a83f3991"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a5b5d89141b4d68c0830b9fe4468ac8f7"><td class="memItemLeft" align="right" valign="top">class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a5b5d89141b4d68c0830b9fe4468ac8f7">SecKey</a></td></tr>
<tr class="separator:a5b5d89141b4d68c0830b9fe4468ac8f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a963530e960d2799753da76e3f3495b10"><td class="memItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a963530e960d2799753da76e3f3495b10">operator&lt;&lt;</a> (std::ostream &amp;str, const <a class="el" href="classhelib_1_1_pub_key.html">PubKey</a> &amp;pk)</td></tr>
<tr class="separator:a963530e960d2799753da76e3f3495b10"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2bdb05bdd189940f7ed0b25ab89fa1ad"><td class="memItemLeft" align="right" valign="top">std::istream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a2bdb05bdd189940f7ed0b25ab89fa1ad">operator&gt;&gt;</a> (std::istream &amp;str, <a class="el" href="classhelib_1_1_pub_key.html">PubKey</a> &amp;pk)</td></tr>
<tr class="separator:a2bdb05bdd189940f7ed0b25ab89fa1ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The public key. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="aafaeff3bae5bac16d5a4bf127e2f6f2d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aafaeff3bae5bac16d5a4bf127e2f6f2d">&#9670;&nbsp;</a></span>PubKey() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">helib::PubKey::PubKey </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This constructor thorws run-time error if activeContext=nullptr. </p>

</div>
</div>
<a id="a825712e884ac70538420e3cd3d553e22"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a825712e884ac70538420e3cd3d553e22">&#9670;&nbsp;</a></span>PubKey() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">helib::PubKey::PubKey </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_context.html">Context</a> &amp;&#160;</td>
          <td class="paramname"><em>_context</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="aa923dff5492cd91bbf8d24ab9258ce1a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa923dff5492cd91bbf8d24ab9258ce1a">&#9670;&nbsp;</a></span>PubKey() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">helib::PubKey::PubKey </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_pub_key.html">PubKey</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Copy constructor. </p>

</div>
</div>
<a id="aabd77762ff776bfbf3ae389b49fa7ac9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aabd77762ff776bfbf3ae389b49fa7ac9">&#9670;&nbsp;</a></span>~PubKey()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual helib::PubKey::~PubKey </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span><span class="mlabel">default</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Default destructor. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="aafbfc62d5d78c39aa7929d552b31ff03"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aafbfc62d5d78c39aa7929d552b31ff03">&#9670;&nbsp;</a></span>CKKSencrypt() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void helib::PubKey::CKKSencrypt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;&#160;</td>
          <td class="paramname"><em>ciphertxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const NTL::ZZX &amp;&#160;</td>
          <td class="paramname"><em>plaintxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>ptxtSize</em> = <code>1.0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>scaling</em> = <code>0.0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a13f6dfdd7645c35558ef906e8e1cfd69"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a13f6dfdd7645c35558ef906e8e1cfd69">&#9670;&nbsp;</a></span>CKKSencrypt() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void helib::PubKey::CKKSencrypt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;&#160;</td>
          <td class="paramname"><em>ciphertxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespacehelib.html#a4d6002f36f1a61982fded09adf1331ca">zzX</a> &amp;&#160;</td>
          <td class="paramname"><em>plaintxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>ptxtSize</em> = <code>1.0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>scaling</em> = <code>0.0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="aa13affb78adf902978fad938c8f56eae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa13affb78adf902978fad938c8f56eae">&#9670;&nbsp;</a></span>clear()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void helib::PubKey::clear </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Clear all public-key data. </p>

<p>Reimplemented in <a class="el" href="classhelib_1_1_sec_key.html#ae51b00cb02aa6e958f19c8a27eb40204">helib::SecKey</a>.</p>

</div>
</div>
<a id="a0346c2c214b648809f6b754de9e5d431"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0346c2c214b648809f6b754de9e5d431">&#9670;&nbsp;</a></span>Encrypt() <span class="overload">[1/7]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long helib::PubKey::Encrypt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;&#160;</td>
          <td class="paramname"><em>ciphertxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const NTL::ZZX &amp;&#160;</td>
          <td class="paramname"><em>plaintxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>ptxtSpace</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>highNoise</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Encrypts plaintext, result returned in the ciphertext argument. When called with highNoise=true, returns a ciphertext with noise level approximately q/8. For <a class="el" href="structhelib_1_1_b_g_v.html" title="Type for BGV scheme, to be used as template parameter.">BGV</a>, ptxtSpace is the intended plaintext space, which cannot be co-prime with pubEncrKey.ptxtSpace. The returned value is the plaintext-space for the resulting ciphertext, which is GCD(ptxtSpace, pubEncrKey.ptxtSpace). For <a class="el" href="structhelib_1_1_c_k_k_s.html" title="Type for CKKS scheme, to be used as template parameter.">CKKS</a>, ptxtSpace is a bound on the size of the complex plaintext elements that are encoded in ptxt (before scaling), it is assumed that they are scaled by context.alMod.encodeScalingFactor(). The returned value is the same as the argument ptxtSpace. </p>

</div>
</div>
<a id="a784412272e2ac12de357319b60c35f36"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a784412272e2ac12de357319b60c35f36">&#9670;&nbsp;</a></span>Encrypt() <span class="overload">[2/7]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">long helib::PubKey::Encrypt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;&#160;</td>
          <td class="paramname"><em>ciphertxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const NTL::ZZX &amp;&#160;</td>
          <td class="paramname"><em>plaintxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>ptxtSpace</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reimplemented in <a class="el" href="classhelib_1_1_sec_key.html#a623e7afa711f904482381dd31476502d">helib::SecKey</a>.</p>

</div>
</div>
<a id="a5744e83be6175512dc561ad9276157da"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5744e83be6175512dc561ad9276157da">&#9670;&nbsp;</a></span>Encrypt() <span class="overload">[3/7]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">long helib::PubKey::Encrypt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;&#160;</td>
          <td class="paramname"><em>ciphertxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_ptxt.html">Ptxt</a>&lt; <a class="el" href="structhelib_1_1_b_g_v.html">BGV</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>plaintxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>ptxtSpace</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="afb5c65279c92fdecf07c34116a6854fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb5c65279c92fdecf07c34116a6854fd">&#9670;&nbsp;</a></span>Encrypt() <span class="overload">[4/7]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">long helib::PubKey::Encrypt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;&#160;</td>
          <td class="paramname"><em>ciphertxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_ptxt.html">Ptxt</a>&lt; <a class="el" href="structhelib_1_1_c_k_k_s.html">CKKS</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>plaintxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="api_attributes_8h.html#addf5ec070e9499d36b7f2009ce736076">UNUSED</a> long&#160;</td>
          <td class="paramname"><em>ptxtSpace</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ab26be749db4dd2b5d102a77bf70f4de3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab26be749db4dd2b5d102a77bf70f4de3">&#9670;&nbsp;</a></span>Encrypt() <span class="overload">[5/7]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Scheme &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">long helib::PubKey::Encrypt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;&#160;</td>
          <td class="paramname"><em>ciphertxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_ptxt.html">Ptxt</a>&lt; Scheme &gt; &amp;&#160;</td>
          <td class="paramname"><em>plaintxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>ptxtSpace</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Encrypts a plaintext into a ciphertext. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">Scheme</td><td>Encryption scheme used (must be <code><a class="el" href="structhelib_1_1_b_g_v.html" title="Type for BGV scheme, to be used as template parameter.">BGV</a></code> or <code><a class="el" href="structhelib_1_1_c_k_k_s.html" title="Type for CKKS scheme, to be used as template parameter.">CKKS</a></code>). </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ciphertxt</td><td>Ciphertext into which to encrypt. </td></tr>
    <tr><td class="paramname">plaintxt</td><td>Plaintext to encrypt. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Plaintext space. </dd></dl>

</div>
</div>
<a id="a4daedf40ea1c65e1004289a6033d59b0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4daedf40ea1c65e1004289a6033d59b0">&#9670;&nbsp;</a></span>Encrypt() <span class="overload">[6/7]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long helib::PubKey::Encrypt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;&#160;</td>
          <td class="paramname"><em>ciphertxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespacehelib.html#a4d6002f36f1a61982fded09adf1331ca">zzX</a> &amp;&#160;</td>
          <td class="paramname"><em>plaintxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>ptxtSpace</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>highNoise</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a7fec47c6a84534ed1b359e3a64f54a83"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7fec47c6a84534ed1b359e3a64f54a83">&#9670;&nbsp;</a></span>Encrypt() <span class="overload">[7/7]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">long helib::PubKey::Encrypt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;&#160;</td>
          <td class="paramname"><em>ciphertxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespacehelib.html#a4d6002f36f1a61982fded09adf1331ca">zzX</a> &amp;&#160;</td>
          <td class="paramname"><em>plaintxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>ptxtSpace</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reimplemented in <a class="el" href="classhelib_1_1_sec_key.html#a8173d4d2d15958e9ba7ceb0a28d21179">helib::SecKey</a>.</p>

</div>
</div>
<a id="ac16ee4cbf52d86accf5f7e82a83f3991"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac16ee4cbf52d86accf5f7e82a83f3991">&#9670;&nbsp;</a></span>ePlusR()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static long helib::PubKey::ePlusR </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>p</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a78cf90689deb41b4dcd2346722e22d9d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a78cf90689deb41b4dcd2346722e22d9d">&#9670;&nbsp;</a></span>getAnyKeySWmatrix()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classhelib_1_1_key_switch.html">KeySwitch</a> &amp; helib::PubKey::getAnyKeySWmatrix </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_s_k_handle.html">SKHandle</a> &amp;&#160;</td>
          <td class="paramname"><em>from</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Is there a matrix from this key to <em>any</em> base key? </p>

</div>
</div>
<a id="aa58d563a7ee4e27f2c46f97a3f5997dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa58d563a7ee4e27f2c46f97a3f5997dc">&#9670;&nbsp;</a></span>getContext()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classhelib_1_1_context.html">Context</a> &amp; helib::PubKey::getContext </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a36e271b46f74eb1f10deeb15f38ef612"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a36e271b46f74eb1f10deeb15f38ef612">&#9670;&nbsp;</a></span>getKeySWmatrix() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classhelib_1_1_key_switch.html">KeySwitch</a> &amp; helib::PubKey::getKeySWmatrix </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_s_k_handle.html">SKHandle</a> &amp;&#160;</td>
          <td class="paramname"><em>from</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>toID</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Find a key-switching matrix by its indexes. If no such matrix exists it returns a dummy matrix with toKeyID==-1. </p>

</div>
</div>
<a id="a1699dcc28066d1628d4924b00c03ff7f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1699dcc28066d1628d4924b00c03ff7f">&#9670;&nbsp;</a></span>getKeySWmatrix() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classhelib_1_1_key_switch.html">KeySwitch</a> &amp; helib::PubKey::getKeySWmatrix </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>fromSPower</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>fromXPower</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>fromID</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>toID</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a5b98b32c0ec476420d0d6f817cccd82c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5b98b32c0ec476420d0d6f817cccd82c">&#9670;&nbsp;</a></span>getKSStrategy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long helib::PubKey::getKSStrategy </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>dim</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>get KS strategy for dimension dim dim == -1 is Frobenius </p>

</div>
</div>
<a id="a0a9ef8dbc3d89b669b8b375352a64e0c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0a9ef8dbc3d89b669b8b375352a64e0c">&#9670;&nbsp;</a></span>getNextKSWmatrix()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classhelib_1_1_key_switch.html">KeySwitch</a> &amp; helib::PubKey::getNextKSWmatrix </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>fromXPower</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>fromID</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the next matrix to use for multi-hop automorphism See Section 3.2.2 in the design document. </p>

</div>
</div>
<a id="aa470fb7bc65e658efd02858188078384"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa470fb7bc65e658efd02858188078384">&#9670;&nbsp;</a></span>getPtxtSpace()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long helib::PubKey::getPtxtSpace </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="af00d3629c7dc16946cc48942edf797fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af00d3629c7dc16946cc48942edf797fb">&#9670;&nbsp;</a></span>getSKeyBound()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double helib::PubKey::getSKeyBound </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>keyID</em> = <code>0</code></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The size of the secret key. </p>

</div>
</div>
<a id="ad607fc183a04a38ea758df7094957410"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad607fc183a04a38ea758df7094957410">&#9670;&nbsp;</a></span>hackPtxtSpace()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void helib::PubKey::hackPtxtSpace </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>p2r</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a85d422013d6854bd95947a75da4ccf63"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a85d422013d6854bd95947a75da4ccf63">&#9670;&nbsp;</a></span>haveAnyKeySWmatrix()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool helib::PubKey::haveAnyKeySWmatrix </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_s_k_handle.html">SKHandle</a> &amp;&#160;</td>
          <td class="paramname"><em>from</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="aabf2e70d488f0e10604861d9d1d1b586"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aabf2e70d488f0e10604861d9d1d1b586">&#9670;&nbsp;</a></span>haveKeySWmatrix() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool helib::PubKey::haveKeySWmatrix </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_s_k_handle.html">SKHandle</a> &amp;&#160;</td>
          <td class="paramname"><em>from</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>toID</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a802336b0a511ddfe07495d6386061041"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a802336b0a511ddfe07495d6386061041">&#9670;&nbsp;</a></span>haveKeySWmatrix() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool helib::PubKey::haveKeySWmatrix </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>fromSPower</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>fromXPower</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>fromID</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>toID</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ad0ad65deb509b0e020dd603a4857492a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad0ad65deb509b0e020dd603a4857492a">&#9670;&nbsp;</a></span>isBootstrappable()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool helib::PubKey::isBootstrappable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ab8aed3e83355c67529fa2f53b2fb1ba5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab8aed3e83355c67529fa2f53b2fb1ba5">&#9670;&nbsp;</a></span>isCKKS()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool helib::PubKey::isCKKS </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a67598f5056cba7b1b94fcdd8482a947c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a67598f5056cba7b1b94fcdd8482a947c">&#9670;&nbsp;</a></span>isReachable()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool helib::PubKey::isReachable </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>k</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>keyID</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Is it possible to re-linearize the automorphism X -&gt; X^k See Section 3.2.2 in the design document (KeySwitchMap) </p>

</div>
</div>
<a id="aa19bebb6be7b4cedb58a1a045df68b3a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa19bebb6be7b4cedb58a1a045df68b3a">&#9670;&nbsp;</a></span>keyExists()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool helib::PubKey::keyExists </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>keyID</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="adf27c278c7ae39ad8f7550774693fe2d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adf27c278c7ae39ad8f7550774693fe2d">&#9670;&nbsp;</a></span>keySWlist()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const std::vector&lt; <a class="el" href="classhelib_1_1_key_switch.html">KeySwitch</a> &gt; &amp; helib::PubKey::keySWlist </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a014ede31ce4b686ddf491d30cd7a581a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a014ede31ce4b686ddf491d30cd7a581a">&#9670;&nbsp;</a></span>operator!=()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool helib::PubKey::operator!= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_pub_key.html">PubKey</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ae7a054c57be24207281e69608bed29b2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae7a054c57be24207281e69608bed29b2">&#9670;&nbsp;</a></span>operator==()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool helib::PubKey::operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_pub_key.html">PubKey</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a65479b612f5d28386fb1205858416957"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a65479b612f5d28386fb1205858416957">&#9670;&nbsp;</a></span>reCrypt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void helib::PubKey::reCrypt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;&#160;</td>
          <td class="paramname"><em>ctxt</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a8abfcc223328521acf1976e5dd33ba53"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8abfcc223328521acf1976e5dd33ba53">&#9670;&nbsp;</a></span>setKeySwitchMap()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void helib::PubKey::setKeySwitchMap </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>keyId</em> = <code>0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Compute the reachability graph of key-switching matrices See Section 3.2.2 in the design document (KeySwitchMap) </p>

</div>
</div>
<a id="a448fbc74eecbdb3b369dcea9c5d85ce2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a448fbc74eecbdb3b369dcea9c5d85ce2">&#9670;&nbsp;</a></span>setKSStrategy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void helib::PubKey::setKSStrategy </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>dim</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>set KS strategy for dimension dim dim == -1 is Frobenius </p>

</div>
</div>
<a id="ac442b7e06a49fde0d0cd067f00c259e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac442b7e06a49fde0d0cd067f00c259e8">&#9670;&nbsp;</a></span>thinReCrypt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void helib::PubKey::thinReCrypt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;&#160;</td>
          <td class="paramname"><em>ctxt</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a97b95f757398bed078ac7e01efd96ec3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a97b95f757398bed078ac7e01efd96ec3">&#9670;&nbsp;</a></span>void ::helib::readPubKeyBinary()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">helib::PubKey::void ::<a class="el" href="namespacehelib.html#adc9656603a03fba1b8720db0d2e5cee9">helib::readPubKeyBinary</a> </td>
          <td>(</td>
          <td class="paramtype">std::istream &amp;&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_pub_key.html">PubKey</a> &amp;&#160;</td>
          <td class="paramname"><em>pk</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a45c4f7b5816402ddaf16c7df1b60b9c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a45c4f7b5816402ddaf16c7df1b60b9c6">&#9670;&nbsp;</a></span>void ::helib::writePubKeyBinary()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">helib::PubKey::void ::<a class="el" href="namespacehelib.html#a3fe91feb5d65b0afc826f181557a56e4">helib::writePubKeyBinary</a> </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_pub_key.html">PubKey</a> &amp;&#160;</td>
          <td class="paramname"><em>pk</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a id="a963530e960d2799753da76e3f3495b10"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a963530e960d2799753da76e3f3495b10">&#9670;&nbsp;</a></span>operator&lt;&lt;</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::ostream&amp; operator&lt;&lt; </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_pub_key.html">PubKey</a> &amp;&#160;</td>
          <td class="paramname"><em>pk</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a2bdb05bdd189940f7ed0b25ab89fa1ad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2bdb05bdd189940f7ed0b25ab89fa1ad">&#9670;&nbsp;</a></span>operator&gt;&gt;</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::istream&amp; operator&gt;&gt; </td>
          <td>(</td>
          <td class="paramtype">std::istream &amp;&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_pub_key.html">PubKey</a> &amp;&#160;</td>
          <td class="paramname"><em>pk</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a5b5d89141b4d68c0830b9fe4468ac8f7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5b5d89141b4d68c0830b9fe4468ac8f7">&#9670;&nbsp;</a></span>SecKey</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">friend class <a class="el" href="classhelib_1_1_sec_key.html">SecKey</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/HElib/include/helib/<a class="el" href="keys_8h_source.html">keys.h</a></li>
<li>/HElib/src/<a class="el" href="keys_8cpp.html">keys.cpp</a></li>
<li>/HElib/src/<a class="el" href="recryption_8cpp.html">recryption.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
        <script type="text/javascript" src="doxy-boot.js"></script>
</html>
